package com.hyl.crmclient.controller;

import com.hyl.jpademo.entity.User;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.servlet.http.HttpServletResponse;
import java.util.ArrayList;
import java.util.List;

/**
 * @Description TODO
 * @Author hyl
 * @Date 2022/6/27 15:19
 **/
@RestController
//@CrossOrigin(originPatterns = {"http://localhost:8080","http://127.0.0.1:8848"})
public class TestController {

	@RequestMapping(value = "/test")
	public String test(HttpServletResponse response){
		//response.addHeader("Access-Control-Allow-Origin", "http://127.0.0.1:8848");
		String tmp = "[{ id: 1001, name: '娱乐', desc: '娱乐新闻' },{ id: 1002, name: '体育', desc: '体育新闻' }]";
		return tmp;
	}
}
